<?php
class BaiduModel extends BaseModel
{
	public function aquacity(){
		$return = array();
		$pv = 0;
		$dates = $this->select();
		foreach($dates as $date){
			$date_json = (Array)json_decode($date['date']);
			foreach($date_json['tbody'] as $d){
				$d = (Array)$d;
				//搜索 aquacity
				if(strchr($d['name'], 'aquacity')){
					$c['url'] = $d['name'];
					$c['data'] = $d['data'][0];
					$pv = $pv + intval($c['data'][1]);
					$return['data'][] = $c;
				}
			}
		}
		$return['pv'] = $pv;
		return $return;
	}
}